def draw(canvas, points, objType=None):
  obj = MapObj(objType)
  arr = []
  for p in points:
    arr.append(p[0])
    arr.append(p[1])
  print 'draw canvas : ', arr
  canvas.create_polygon(arr, fill = 'white', outline='black')

class MapObj:
  def __init__(self, objType):
    self.type = objType

  def getColor(self):
    return self.colors[self.type]

  colors = {
    # building
    'building' : 'snow',
    # room
    'cabinet' : 'brown',
    'canteen' : 'grey',
    'wc' : 'aquamarine',
    'auditory' : 'gray',
    'computer class' : 'black',
    'warehouse' : 'yellow',
    'elevator' : 'gray',
    'security' : 'blue',
    'control room' : '',
    # corridor
    'stairs' : 'purple',
    'hall' : 'ghost wight',
    'corridor' : 'ghost wight'
    }
